<template>
<div class="box-line">
    <div class="mask-box" :style="`width:${100 * item.rate}%`"></div>
    <div class="con">{{item.value}}</div>
</div>
</template>

<script>
export default {
    name: 'BoxLine',
    props: {
        item: {
            type: Object
        }
    }
}
</script>

<style lang="less">
.box-line {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 0 12px;
    line-height: 38px;
    position: absolute;

    .mask-box {
        height: 100%;
        background: #CDE2EB;
        position: absolute;
        top: 0;
        left: 0;
    }

    .con {
        position: relative;
        z-index: 100;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
</style>
